/*
 * Copyright (c) 2023 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef CF_TEST_DATA_H
#define CF_TEST_DATA_H

#include "cf_type.h"

namespace CertframeworkTestData {
/* Cert object test data */
static const uint8_t g_certData01[] = { /* Der format with subjectUID and issuerUID */
    0x30, 0x82, 0x03, 0x4c, 0x30, 0x82, 0x02, 0x34, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x06, 0x20,
    0x06, 0x05, 0x16, 0x70, 0x02, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01,
    0x01, 0x05, 0x05, 0x00, 0x30, 0x3b, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13,
    0x02, 0x52, 0x4f, 0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x08, 0x63, 0x65,
    0x72, 0x74, 0x53, 0x49, 0x47, 0x4e, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13,
    0x10, 0x63, 0x65, 0x72, 0x74, 0x53, 0x49, 0x47, 0x4e, 0x20, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x43,
    0x41, 0x30, 0x1e, 0x17, 0x0d, 0x30, 0x36, 0x30, 0x37, 0x30, 0x34, 0x31, 0x37, 0x32, 0x30, 0x30,
    0x34, 0x5a, 0x17, 0x0d, 0x33, 0x31, 0x30, 0x37, 0x30, 0x34, 0x31, 0x37, 0x32, 0x30, 0x30, 0x34,
    0x5a, 0x30, 0x3b, 0x31, 0x0b, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x52, 0x4f,
    0x31, 0x11, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x04, 0x0a, 0x13, 0x08, 0x63, 0x65, 0x72, 0x74, 0x53,
    0x49, 0x47, 0x4e, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x0b, 0x13, 0x10, 0x63, 0x65,
    0x72, 0x74, 0x53, 0x49, 0x47, 0x4e, 0x20, 0x52, 0x4f, 0x4f, 0x54, 0x20, 0x43, 0x41, 0x30, 0x82,
    0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x01, 0x05,
    0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01, 0x00, 0xb7,
    0x33, 0xb9, 0x7e, 0xc8, 0x25, 0x4a, 0x8e, 0xb5, 0xdb, 0xb4, 0x28, 0x1b, 0xaa, 0x57, 0x90, 0xe8,
    0xd1, 0x22, 0xd3, 0x64, 0xba, 0xd3, 0x93, 0xe8, 0xd4, 0xac, 0x86, 0x61, 0x40, 0x6a, 0x60, 0x57,
    0x68, 0x54, 0x84, 0x4d, 0xbc, 0x6a, 0x54, 0x02, 0x05, 0xff, 0xdf, 0x9b, 0x9a, 0x2a, 0xae, 0x5d,
    0x07, 0x8f, 0x4a, 0xc3, 0x28, 0x7f, 0xef, 0xfb, 0x2b, 0xfa, 0x79, 0xf1, 0xc7, 0xad, 0xf0, 0x10,
    0x53, 0x24, 0x90, 0x8b, 0x66, 0xc9, 0xa8, 0x88, 0xab, 0xaf, 0x5a, 0xa3, 0x00, 0xe9, 0xbe, 0xba,
    0x46, 0xee, 0x5b, 0x73, 0x7b, 0x2c, 0x17, 0x82, 0x81, 0x5e, 0x62, 0x2c, 0xa1, 0x02, 0x65, 0xb3,
    0xbd, 0xc5, 0x2b, 0x00, 0x7e, 0xc4, 0xfc, 0x03, 0x33, 0x57, 0x0d, 0xed, 0xe2, 0xfa, 0xce, 0x5d,
    0x45, 0xd6, 0x38, 0xcd, 0x35, 0xb6, 0xb2, 0xc1, 0xd0, 0x9c, 0x81, 0x4a, 0xaa, 0xe4, 0xb2, 0x01,
    0x5c, 0x1d, 0x8f, 0x5f, 0x99, 0xc4, 0xb1, 0xad, 0xdb, 0x88, 0x21, 0xeb, 0x90, 0x08, 0x82, 0x80,
    0xf3, 0x30, 0xa3, 0x43, 0xe6, 0x90, 0x82, 0xae, 0x55, 0x28, 0x49, 0xed, 0x5b, 0xd7, 0xa9, 0x10,
    0x38, 0x0e, 0xfe, 0x8f, 0x4c, 0x5b, 0x9b, 0x46, 0xea, 0x41, 0xf5, 0xb0, 0x08, 0x74, 0xc3, 0xd0,
    0x88, 0x33, 0xb6, 0x7c, 0xd7, 0x74, 0xdf, 0xdc, 0x84, 0xd1, 0x43, 0x0e, 0x75, 0x39, 0xa1, 0x25,
    0x40, 0x28, 0xea, 0x78, 0xcb, 0x0e, 0x2c, 0x2e, 0x39, 0x9d, 0x8c, 0x8b, 0x6e, 0x16, 0x1c, 0x2f,
    0x26, 0x82, 0x10, 0xe2, 0xe3, 0x65, 0x94, 0x0a, 0x04, 0xc0, 0x5e, 0xf7, 0x5d, 0x5b, 0xf8, 0x10,
    0xe2, 0xd0, 0xba, 0x7a, 0x4b, 0xfb, 0xde, 0x37, 0x00, 0x00, 0x1a, 0x5b, 0x28, 0xe3, 0xd2, 0x9c,
    0x73, 0x3e, 0x32, 0x87, 0x98, 0xa1, 0xc9, 0x51, 0x2f, 0xd7, 0xde, 0xac, 0x33, 0xb3, 0x4f, 0x02,
    0x03, 0x01, 0x00, 0x01, 0xa1, 0x08, 0x03, 0x06, 0x01, 0x01, 0x00, 0x4D, 0x57, 0x12, 0xa2, 0x08,
    0x03, 0x06, 0x01, 0x02, 0x03, 0x4D, 0x57, 0x12, 0xa3, 0x42, 0x30, 0x40, 0x30, 0x0f, 0x06, 0x03,
    0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xff, 0x30, 0x0e, 0x06,
    0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, 0x01, 0xc6, 0x30, 0x1d, 0x06,
    0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xe0, 0x8c, 0x9b, 0xdb, 0x25, 0x49, 0xb3, 0xf1,
    0x7c, 0x86, 0xd6, 0xb2, 0x42, 0x87, 0x0b, 0xd0, 0x6b, 0xa0, 0xd9, 0xe4, 0x30, 0x0d, 0x06, 0x09,
    0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01, 0x05, 0x05, 0x00, 0x03, 0x82, 0x01, 0x01, 0x00,
    0x3e, 0xd2, 0x1c, 0x89, 0x2e, 0x35, 0xfc, 0xf8, 0x75, 0xdd, 0xe6, 0x7f, 0x65, 0x88, 0xf4, 0x72,
    0x4c, 0xc9, 0x2c, 0xd7, 0x32, 0x4e, 0xf3, 0xdd, 0x19, 0x79, 0x47, 0xbd, 0x8e, 0x3b, 0x5b, 0x93,
    0x0f, 0x50, 0x49, 0x24, 0x13, 0x6b, 0x14, 0x06, 0x72, 0xef, 0x09, 0xd3, 0xa1, 0xa1, 0xe3, 0x40,
    0x84, 0xc9, 0xe7, 0x18, 0x32, 0x74, 0x3c, 0x48, 0x6e, 0x0f, 0x9f, 0x4b, 0xd4, 0xf7, 0x1e, 0xd3,
    0x93, 0x86, 0x64, 0x54, 0x97, 0x63, 0x72, 0x50, 0xd5, 0x55, 0xcf, 0xfa, 0x20, 0x93, 0x02, 0xa2,
    0x9b, 0xc3, 0x23, 0x93, 0x4e, 0x16, 0x55, 0x76, 0xa0, 0x70, 0x79, 0x6d, 0xcd, 0x21, 0x1f, 0xcf,
    0x2f, 0x2d, 0xbc, 0x19, 0xe3, 0x88, 0x31, 0xf8, 0x59, 0x1a, 0x81, 0x09, 0xc8, 0x97, 0xa6, 0x74,
    0xc7, 0x60, 0xc4, 0x5b, 0xcc, 0x57, 0x8e, 0xb2, 0x75, 0xfd, 0x1b, 0x02, 0x09, 0xdb, 0x59, 0x6f,
    0x72, 0x93, 0x69, 0xf7, 0x31, 0x41, 0xd6, 0x88, 0x38, 0xbf, 0x87, 0xb2, 0xbd, 0x16, 0x79, 0xf9,
    0xaa, 0xe4, 0xbe, 0x88, 0x25, 0xdd, 0x61, 0x27, 0x23, 0x1c, 0xb5, 0x31, 0x07, 0x04, 0x36, 0xb4,
    0x1a, 0x90, 0xbd, 0xa0, 0x74, 0x71, 0x50, 0x89, 0x6d, 0xbc, 0x14, 0xe3, 0x0f, 0x86, 0xae, 0xf1,
    0xab, 0x3e, 0xc7, 0xa0, 0x09, 0xcc, 0xa3, 0x48, 0xd1, 0xe0, 0xdb, 0x64, 0xe7, 0x92, 0xb5, 0xcf,
    0xaf, 0x72, 0x43, 0x70, 0x8b, 0xf9, 0xc3, 0x84, 0x3c, 0x13, 0xaa, 0x7e, 0x92, 0x9b, 0x57, 0x53,
    0x93, 0xfa, 0x70, 0xc2, 0x91, 0x0e, 0x31, 0xf9, 0x9b, 0x67, 0x5d, 0xe9, 0x96, 0x38, 0x5e, 0x5f,
    0xb3, 0x73, 0x4e, 0x88, 0x15, 0x67, 0xde, 0x9e, 0x76, 0x10, 0x62, 0x20, 0xbe, 0x55, 0x69, 0x95,
    0x43, 0x00, 0x39, 0x4d, 0xf6, 0xee, 0xb0, 0x5a, 0x4e, 0x49, 0x44, 0x54, 0x58, 0x5f, 0x42, 0x83
};

static const uint8_t g_certData01TBS[] = { /* Der format */
    0x30, 0x82, 0x02, 0x30, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x06, 0x20, 0x06, 0x05, 0x16, 0x70,
    0x02, 0x30, 0x0D, 0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x05, 0x05, 0x00,
    0x30, 0x3B, 0x31, 0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x52, 0x4F, 0x31,
    0x11, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x08, 0x63, 0x65, 0x72, 0x74, 0x53, 0x49,
    0x47, 0x4E, 0x31, 0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x10, 0x63, 0x65, 0x72,
    0x74, 0x53, 0x49, 0x47, 0x4E, 0x20, 0x52, 0x4F, 0x4F, 0x54, 0x20, 0x43, 0x41, 0x30, 0x1E, 0x17,
    0x0D, 0x30, 0x36, 0x30, 0x37, 0x30, 0x34, 0x31, 0x37, 0x32, 0x30, 0x30, 0x34, 0x5A, 0x17, 0x0D,
    0x33, 0x31, 0x30, 0x37, 0x30, 0x34, 0x31, 0x37, 0x32, 0x30, 0x30, 0x34, 0x5A, 0x30, 0x3B, 0x31,
    0x0B, 0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x52, 0x4F, 0x31, 0x11, 0x30, 0x0F,
    0x06, 0x03, 0x55, 0x04, 0x0A, 0x13, 0x08, 0x63, 0x65, 0x72, 0x74, 0x53, 0x49, 0x47, 0x4E, 0x31,
    0x19, 0x30, 0x17, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x13, 0x10, 0x63, 0x65, 0x72, 0x74, 0x53, 0x49,
    0x47, 0x4E, 0x20, 0x52, 0x4F, 0x4F, 0x54, 0x20, 0x43, 0x41, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D,
    0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01,
    0x0F, 0x00, 0x30, 0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0xB7, 0x33, 0xB9, 0x7E, 0xC8,
    0x25, 0x4A, 0x8E, 0xB5, 0xDB, 0xB4, 0x28, 0x1B, 0xAA, 0x57, 0x90, 0xE8, 0xD1, 0x22, 0xD3, 0x64,
    0xBA, 0xD3, 0x93, 0xE8, 0xD4, 0xAC, 0x86, 0x61, 0x40, 0x6A, 0x60, 0x57, 0x68, 0x54, 0x84, 0x4D,
    0xBC, 0x6A, 0x54, 0x02, 0x05, 0xFF, 0xDF, 0x9B, 0x9A, 0x2A, 0xAE, 0x5D, 0x07, 0x8F, 0x4A, 0xC3,
    0x28, 0x7F, 0xEF, 0xFB, 0x2B, 0xFA, 0x79, 0xF1, 0xC7, 0xAD, 0xF0, 0x10, 0x53, 0x24, 0x90, 0x8B,
    0x66, 0xC9, 0xA8, 0x88, 0xAB, 0xAF, 0x5A, 0xA3, 0x00, 0xE9, 0xBE, 0xBA, 0x46, 0xEE, 0x5B, 0x73,
    0x7B, 0x2C, 0x17, 0x82, 0x81, 0x5E, 0x62, 0x2C, 0xA1, 0x02, 0x65, 0xB3, 0xBD, 0xC5, 0x2B, 0x00,
    0x7E, 0xC4, 0xFC, 0x03, 0x33, 0x57, 0x0D, 0xED, 0xE2, 0xFA, 0xCE, 0x5D, 0x45, 0xD6, 0x38, 0xCD,
    0x35, 0xB6, 0xB2, 0xC1, 0xD0, 0x9C, 0x81, 0x4A, 0xAA, 0xE4, 0xB2, 0x01, 0x5C, 0x1D, 0x8F, 0x5F,
    0x99, 0xC4, 0xB1, 0xAD, 0xDB, 0x88, 0x21, 0xEB, 0x90, 0x08, 0x82, 0x80, 0xF3, 0x30, 0xA3, 0x43,
    0xE6, 0x90, 0x82, 0xAE, 0x55, 0x28, 0x49, 0xED, 0x5B, 0xD7, 0xA9, 0x10, 0x38, 0x0E, 0xFE, 0x8F,
    0x4C, 0x5B, 0x9B, 0x46, 0xEA, 0x41, 0xF5, 0xB0, 0x08, 0x74, 0xC3, 0xD0, 0x88, 0x33, 0xB6, 0x7C,
    0xD7, 0x74, 0xDF, 0xDC, 0x84, 0xD1, 0x43, 0x0E, 0x75, 0x39, 0xA1, 0x25, 0x40, 0x28, 0xEA, 0x78,
    0xCB, 0x0E, 0x2C, 0x2E, 0x39, 0x9D, 0x8C, 0x8B, 0x6E, 0x16, 0x1C, 0x2F, 0x26, 0x82, 0x10, 0xE2,
    0xE3, 0x65, 0x94, 0x0A, 0x04, 0xC0, 0x5E, 0xF7, 0x5D, 0x5B, 0xF8, 0x10, 0xE2, 0xD0, 0xBA, 0x7A,
    0x4B, 0xFB, 0xDE, 0x37, 0x00, 0x00, 0x1A, 0x5B, 0x28, 0xE3, 0xD2, 0x9C, 0x73, 0x3E, 0x32, 0x87,
    0x98, 0xA1, 0xC9, 0x51, 0x2F, 0xD7, 0xDE, 0xAC, 0x33, 0xB3, 0x4F, 0x02, 0x03, 0x01, 0x00, 0x01,
    0x81, 0x06, 0x01, 0x01, 0x00, 0x4D, 0x57, 0x12, 0x82, 0x06, 0x01, 0x02, 0x03, 0x4D, 0x57, 0x12,
    0xA3, 0x42, 0x30, 0x40, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05,
    0x30, 0x03, 0x01, 0x01, 0xFF, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04,
    0x04, 0x03, 0x02, 0x01, 0xC6, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14,
    0xE0, 0x8C, 0x9B, 0xDB, 0x25, 0x49, 0xB3, 0xF1, 0x7C, 0x86, 0xD6, 0xB2, 0x42, 0x87, 0x0B, 0xD0,
    0x6B, 0xA0, 0xD9, 0xE4
};

static const uint8_t g_certData01IssuerUID[] = { /* Der format */
    0x03, 0x06, 0x01, 0x01, 0x00, 0x4D, 0x57, 0x12
};

static const uint8_t g_certData01SubjectUID[] = { /* Der format */
    0x03, 0x06, 0x01, 0x02, 0x03, 0x4D, 0x57, 0x12
};

static const uint8_t g_certData01PubKey[] = {
    0x30, 0x82, 0x01, 0x22, 0x30, 0x0d, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x01,
    0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0f, 0x00, 0x30, 0x82, 0x01, 0x0a, 0x02, 0x82, 0x01, 0x01,
    0x00, 0xb7, 0x33, 0xb9, 0x7e, 0xc8, 0x25, 0x4a, 0x8e, 0xb5, 0xdb, 0xb4, 0x28, 0x1b, 0xaa, 0x57,
    0x90, 0xe8, 0xd1, 0x22, 0xd3, 0x64, 0xba, 0xd3, 0x93, 0xe8, 0xd4, 0xac, 0x86, 0x61, 0x40, 0x6a,
    0x60, 0x57, 0x68, 0x54, 0x84, 0x4d, 0xbc, 0x6a, 0x54, 0x02, 0x05, 0xff, 0xdf, 0x9b, 0x9a, 0x2a,
    0xae, 0x5d, 0x07, 0x8f, 0x4a, 0xc3, 0x28, 0x7f, 0xef, 0xfb, 0x2b, 0xfa, 0x79, 0xf1, 0xc7, 0xad,
    0xf0, 0x10, 0x53, 0x24, 0x90, 0x8b, 0x66, 0xc9, 0xa8, 0x88, 0xab, 0xaf, 0x5a, 0xa3, 0x00, 0xe9,
    0xbe, 0xba, 0x46, 0xee, 0x5b, 0x73, 0x7b, 0x2c, 0x17, 0x82, 0x81, 0x5e, 0x62, 0x2c, 0xa1, 0x02,
    0x65, 0xb3, 0xbd, 0xc5, 0x2b, 0x00, 0x7e, 0xc4, 0xfc, 0x03, 0x33, 0x57, 0x0d, 0xed, 0xe2, 0xfa,
    0xce, 0x5d, 0x45, 0xd6, 0x38, 0xcd, 0x35, 0xb6, 0xb2, 0xc1, 0xd0, 0x9c, 0x81, 0x4a, 0xaa, 0xe4,
    0xb2, 0x01, 0x5c, 0x1d, 0x8f, 0x5f, 0x99, 0xc4, 0xb1, 0xad, 0xdb, 0x88, 0x21, 0xeb, 0x90, 0x08,
    0x82, 0x80, 0xf3, 0x30, 0xa3, 0x43, 0xe6, 0x90, 0x82, 0xae, 0x55, 0x28, 0x49, 0xed, 0x5b, 0xd7,
    0xa9, 0x10, 0x38, 0x0e, 0xfe, 0x8f, 0x4c, 0x5b, 0x9b, 0x46, 0xea, 0x41, 0xf5, 0xb0, 0x08, 0x74,
    0xc3, 0xd0, 0x88, 0x33, 0xb6, 0x7c, 0xd7, 0x74, 0xdf, 0xdc, 0x84, 0xd1, 0x43, 0x0e, 0x75, 0x39,
    0xa1, 0x25, 0x40, 0x28, 0xea, 0x78, 0xcb, 0x0e, 0x2c, 0x2e, 0x39, 0x9d, 0x8c, 0x8b, 0x6e, 0x16,
    0x1c, 0x2f, 0x26, 0x82, 0x10, 0xe2, 0xe3, 0x65, 0x94, 0x0a, 0x04, 0xc0, 0x5e, 0xf7, 0x5d, 0x5b,
    0xf8, 0x10, 0xe2, 0xd0, 0xba, 0x7a, 0x4b, 0xfb, 0xde, 0x37, 0x00, 0x00, 0x1a, 0x5b, 0x28, 0xe3,
    0xd2, 0x9c, 0x73, 0x3e, 0x32, 0x87, 0x98, 0xa1, 0xc9, 0x51, 0x2f, 0xd7, 0xde, 0xac, 0x33, 0xb3,
    0x4f, 0x02, 0x03, 0x01, 0x00, 0x01,
};

static char g_certData02[] = /* Pem format without subjectUID and issuerUID */
"-----BEGIN CERTIFICATE-----\r\n"
"MIID/jCCAuagAwIBAgIBATANBgkqhkiG9w0BAQsFADCBjDELMAkGA1UEBhMCQ04x\r\n"
"ETAPBgNVBAgMCHNoYW5naGFpMQ8wDQYDVQQHDAZodWF3ZWkxFTATBgNVBAoMDHd3\r\n"
"dy50ZXN0LmNvbTENMAsGA1UECwwEdGVzdDEVMBMGA1UEAwwMd3d3LnRlc3QuY29t\r\n"
"MRwwGgYJKoZIhvcNAQkBFg10ZXN0QHRlc3QuY29tMB4XDTIyMDgyOTA2NTUwM1oX\r\n"
"DTIzMDgyOTA2NTUwM1owezELMAkGA1UEBhMCQ04xETAPBgNVBAgMCHNoYW5naGFp\r\n"
"MRUwEwYDVQQKDAx3d3cudGVzdC5jb20xDTALBgNVBAsMBHRlc3QxFTATBgNVBAMM\r\n"
"DHd3dy50ZXN0LmNvbTEcMBoGCSqGSIb3DQEJARYNdGVzdEB0ZXN0LmNvbTCCASIw\r\n"
"DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJmY9T4SzXXwKvfMvnvMWY7TqUJK\r\n"
"jnWf2Puv0YUQ2fdvyoKQ2LQXdtzoUL53j587oI+IXelOr7dg020zPyun0cmZHZ4y\r\n"
"l/qAcrWbDjZeEGcbbb5UtQtn1WOEnv8pkXluO355mbZQUKK9L3gFWseXJKGbIXw0\r\n"
"NRpaJZzqvPor4m3a5pmJKPHOlivUdYfLaKSkNj3DlaFzCWKV82k5ee6gzVyETtG+\r\n"
"XN+vq8qLybT+fIFsLNMmAHzRxlqz3NiH7yh+1/p/Knvf8bkkRVR2btH51RyX2RSu\r\n"
"DjPM0/VRL8fxDSDeWBq+Gvn/E6AbOVMmkx63tcyWHhklCSaZtyz7kq39TQMCAwEA\r\n"
"AaN7MHkwCQYDVR0TBAIwADAsBglghkgBhvhCAQ0EHxYdT3BlblNTTCBHZW5lcmF0\r\n"
"ZWQgQ2VydGlmaWNhdGUwHQYDVR0OBBYEFFiFDysfADQCzRZCOSPupQxFicwzMB8G\r\n"
"A1UdIwQYMBaAFNYQRQiPsG8HefOTsmsVhaVjY7IPMA0GCSqGSIb3DQEBCwUAA4IB\r\n"
"AQAeppxf6sKQJxJQXKPTT3xHKaskidNwDBbOSIvnVvWXicZXDs+1sF6tUaRgvPxL\r\n"
"OL58+P2Jy0tfSwj2WhqQRGe9MvQ5iFHcdelZc0ciW6EQ0VDHIaDAQc2nQzej/79w\r\n"
"UE7BJJV3b9n1be2iCsuodKO14pOkMb84WcIxng+8SD+MiFqV5BPO1QyKGdO1PE1b\r\n"
"+evjyTpFSTgZf2Mw3fGtu5hfEXyHw1lnsFY2MlSwiRlAym/gm4aXy+4H6LyXKd56\r\n"
"UYQ6fituD0ziaw3RI6liyIe7aENHCkZf6bAvMRhk4QiU4xu6emwX8Qt1bT7RthP0\r\n"
"1Vsro0IOeXT9WAcqEtQUegsi\r\n"
"-----END CERTIFICATE-----\r\n";

static const uint8_t g_certData02Extension[] = { /* Der format */
    0x30, 0x79, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x2C, 0x06,
    0x09, 0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x0D, 0x04, 0x1F, 0x16, 0x1D, 0x4F, 0x70,
    0x65, 0x6E, 0x53, 0x53, 0x4C, 0x20, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20,
    0x43, 0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x30, 0x1D, 0x06, 0x03, 0x55,
    0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0x58, 0x85, 0x0F, 0x2B, 0x1F, 0x00, 0x34, 0x02, 0xCD, 0x16,
    0x42, 0x39, 0x23, 0xEE, 0xA5, 0x0C, 0x45, 0x89, 0xCC, 0x33, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D,
    0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xD6, 0x10, 0x45, 0x08, 0x8F, 0xB0, 0x6F, 0x07, 0x79,
    0xF3, 0x93, 0xB2, 0x6B, 0x15, 0x85, 0xA5, 0x63, 0x63, 0xB2, 0x0F
};

static const uint8_t g_certData02TBS[] = { /* Der format */
    0x30, 0x82, 0x02, 0xE6, 0xA0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x01, 0x01, 0x30, 0x0D, 0x06, 0x09,
    0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x0B, 0x05, 0x00, 0x30, 0x81, 0x8C, 0x31, 0x0B,
    0x30, 0x09, 0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4E, 0x31, 0x11, 0x30, 0x0F, 0x06,
    0x03, 0x55, 0x04, 0x08, 0x0C, 0x08, 0x73, 0x68, 0x61, 0x6E, 0x67, 0x68, 0x61, 0x69, 0x31, 0x0F,
    0x30, 0x0D, 0x06, 0x03, 0x55, 0x04, 0x07, 0x0C, 0x06, 0x68, 0x75, 0x61, 0x77, 0x65, 0x69, 0x31,
    0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0C, 0x77, 0x77, 0x77, 0x2E, 0x74, 0x65,
    0x73, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x0D, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C,
    0x04, 0x74, 0x65, 0x73, 0x74, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0C,
    0x77, 0x77, 0x77, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1C, 0x30, 0x1A,
    0x06, 0x09, 0x2A, 0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0D, 0x74, 0x65, 0x73,
    0x74, 0x40, 0x74, 0x65, 0x73, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x1E, 0x17, 0x0D, 0x32, 0x32,
    0x30, 0x38, 0x32, 0x39, 0x30, 0x36, 0x35, 0x35, 0x30, 0x33, 0x5A, 0x17, 0x0D, 0x32, 0x33, 0x30,
    0x38, 0x32, 0x39, 0x30, 0x36, 0x35, 0x35, 0x30, 0x33, 0x5A, 0x30, 0x7B, 0x31, 0x0B, 0x30, 0x09,
    0x06, 0x03, 0x55, 0x04, 0x06, 0x13, 0x02, 0x43, 0x4E, 0x31, 0x11, 0x30, 0x0F, 0x06, 0x03, 0x55,
    0x04, 0x08, 0x0C, 0x08, 0x73, 0x68, 0x61, 0x6E, 0x67, 0x68, 0x61, 0x69, 0x31, 0x15, 0x30, 0x13,
    0x06, 0x03, 0x55, 0x04, 0x0A, 0x0C, 0x0C, 0x77, 0x77, 0x77, 0x2E, 0x74, 0x65, 0x73, 0x74, 0x2E,
    0x63, 0x6F, 0x6D, 0x31, 0x0D, 0x30, 0x0B, 0x06, 0x03, 0x55, 0x04, 0x0B, 0x0C, 0x04, 0x74, 0x65,
    0x73, 0x74, 0x31, 0x15, 0x30, 0x13, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0C, 0x0C, 0x77, 0x77, 0x77,
    0x2E, 0x74, 0x65, 0x73, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x31, 0x1C, 0x30, 0x1A, 0x06, 0x09, 0x2A,
    0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x09, 0x01, 0x16, 0x0D, 0x74, 0x65, 0x73, 0x74, 0x40, 0x74,
    0x65, 0x73, 0x74, 0x2E, 0x63, 0x6F, 0x6D, 0x30, 0x82, 0x01, 0x22, 0x30, 0x0D, 0x06, 0x09, 0x2A,
    0x86, 0x48, 0x86, 0xF7, 0x0D, 0x01, 0x01, 0x01, 0x05, 0x00, 0x03, 0x82, 0x01, 0x0F, 0x00, 0x30,
    0x82, 0x01, 0x0A, 0x02, 0x82, 0x01, 0x01, 0x00, 0x99, 0x98, 0xF5, 0x3E, 0x12, 0xCD, 0x75, 0xF0,
    0x2A, 0xF7, 0xCC, 0xBE, 0x7B, 0xCC, 0x59, 0x8E, 0xD3, 0xA9, 0x42, 0x4A, 0x8E, 0x75, 0x9F, 0xD8,
    0xFB, 0xAF, 0xD1, 0x85, 0x10, 0xD9, 0xF7, 0x6F, 0xCA, 0x82, 0x90, 0xD8, 0xB4, 0x17, 0x76, 0xDC,
    0xE8, 0x50, 0xBE, 0x77, 0x8F, 0x9F, 0x3B, 0xA0, 0x8F, 0x88, 0x5D, 0xE9, 0x4E, 0xAF, 0xB7, 0x60,
    0xD3, 0x6D, 0x33, 0x3F, 0x2B, 0xA7, 0xD1, 0xC9, 0x99, 0x1D, 0x9E, 0x32, 0x97, 0xFA, 0x80, 0x72,
    0xB5, 0x9B, 0x0E, 0x36, 0x5E, 0x10, 0x67, 0x1B, 0x6D, 0xBE, 0x54, 0xB5, 0x0B, 0x67, 0xD5, 0x63,
    0x84, 0x9E, 0xFF, 0x29, 0x91, 0x79, 0x6E, 0x3B, 0x7E, 0x79, 0x99, 0xB6, 0x50, 0x50, 0xA2, 0xBD,
    0x2F, 0x78, 0x05, 0x5A, 0xC7, 0x97, 0x24, 0xA1, 0x9B, 0x21, 0x7C, 0x34, 0x35, 0x1A, 0x5A, 0x25,
    0x9C, 0xEA, 0xBC, 0xFA, 0x2B, 0xE2, 0x6D, 0xDA, 0xE6, 0x99, 0x89, 0x28, 0xF1, 0xCE, 0x96, 0x2B,
    0xD4, 0x75, 0x87, 0xCB, 0x68, 0xA4, 0xA4, 0x36, 0x3D, 0xC3, 0x95, 0xA1, 0x73, 0x09, 0x62, 0x95,
    0xF3, 0x69, 0x39, 0x79, 0xEE, 0xA0, 0xCD, 0x5C, 0x84, 0x4E, 0xD1, 0xBE, 0x5C, 0xDF, 0xAF, 0xAB,
    0xCA, 0x8B, 0xC9, 0xB4, 0xFE, 0x7C, 0x81, 0x6C, 0x2C, 0xD3, 0x26, 0x00, 0x7C, 0xD1, 0xC6, 0x5A,
    0xB3, 0xDC, 0xD8, 0x87, 0xEF, 0x28, 0x7E, 0xD7, 0xFA, 0x7F, 0x2A, 0x7B, 0xDF, 0xF1, 0xB9, 0x24,
    0x45, 0x54, 0x76, 0x6E, 0xD1, 0xF9, 0xD5, 0x1C, 0x97, 0xD9, 0x14, 0xAE, 0x0E, 0x33, 0xCC, 0xD3,
    0xF5, 0x51, 0x2F, 0xC7, 0xF1, 0x0D, 0x20, 0xDE, 0x58, 0x1A, 0xBE, 0x1A, 0xF9, 0xFF, 0x13, 0xA0,
    0x1B, 0x39, 0x53, 0x26, 0x93, 0x1E, 0xB7, 0xB5, 0xCC, 0x96, 0x1E, 0x19, 0x25, 0x09, 0x26, 0x99,
    0xB7, 0x2C, 0xFB, 0x92, 0xAD, 0xFD, 0x4D, 0x03, 0x02, 0x03, 0x01, 0x00, 0x01, 0xA3, 0x7B, 0x30,
    0x79, 0x30, 0x09, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x04, 0x02, 0x30, 0x00, 0x30, 0x2C, 0x06, 0x09,
    0x60, 0x86, 0x48, 0x01, 0x86, 0xF8, 0x42, 0x01, 0x0D, 0x04, 0x1F, 0x16, 0x1D, 0x4F, 0x70, 0x65,
    0x6E, 0x53, 0x53, 0x4C, 0x20, 0x47, 0x65, 0x6E, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x43,
    0x65, 0x72, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x65, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D,
    0x0E, 0x04, 0x16, 0x04, 0x14, 0x58, 0x85, 0x0F, 0x2B, 0x1F, 0x00, 0x34, 0x02, 0xCD, 0x16, 0x42,
    0x39, 0x23, 0xEE, 0xA5, 0x0C, 0x45, 0x89, 0xCC, 0x33, 0x30, 0x1F, 0x06, 0x03, 0x55, 0x1D, 0x23,
    0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0xD6, 0x10, 0x45, 0x08, 0x8F, 0xB0, 0x6F, 0x07, 0x79, 0xF3,
    0x93, 0xB2, 0x6B, 0x15, 0x85, 0xA5, 0x63, 0x63, 0xB2, 0x0F
};

static const uint8_t g_certData03[] = {  /* invalid data */
    0x56, 0x0c, 0xc8, 0x9a, 0x37, 0x8d, 0xf7, 0xf1, 0x36, 0x60, 0x4b, 0x26, 0x2c, 0x82, 0x9e, 0xd0,
    0x75, 0x89, 0x8d, 0x51, 0xe4, 0xc3, 0x37, 0xd2, 0x8a, 0x88, 0x4d, 0x79, 0x1e, 0xb7, 0x12, 0xdd,
    0x43, 0x78, 0x4a, 0x80
};

/* Extension object test data */
static const uint8_t g_extensionData01[] = { /* the data gain from g_certData01 */
    0x30, 0x40, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03,
    0x01, 0x01, 0xFF, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x04, 0x03,
    0x02, 0x01, 0xC6, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xE0, 0x8C,
    0x9B, 0xDB, 0x25, 0x49, 0xB3, 0xF1, 0x7C, 0x86, 0xD6, 0xB2, 0x42, 0x87, 0x0B, 0xD0, 0x6B, 0xA0,
    0xD9, 0xE4
};

static const uint8_t g_extensionEntry01[] = { /* the data gain from g_extensionData01 */
    0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03, 0x01, 0x01,
    0xFF
};
static const uint8_t g_extensionEntryCritical01[] = { /* the data gain from g_extensionData01 */
    0x01
};
static const uint8_t g_extensionEntryValue01[] = { /* the data gain from g_extensionData01 */
    0x04, 0x05, 0x30, 0x03, 0x01, 0x01, 0xFF
};

static const uint8_t g_extensionData02[] = { /* Der format */
    0x30, 0x81, 0x86, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,
    0x03, 0x01, 0x01, 0xff, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04, 0x03, 0x02, 0x01,
    0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xa6, 0x91, 0x42, 0xfd,
    0x13, 0x61, 0x4a, 0x23, 0x9e, 0x08, 0xa4, 0x29, 0xe5, 0xd8, 0x13, 0x04, 0x23, 0xee, 0x41, 0x25,
    0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x1e, 0x04, 0x40, 0x30, 0x3e, 0xa0, 0x3c, 0x30, 0x05, 0x82,
    0x03, 0x2e, 0x67, 0x72, 0x30, 0x05, 0x82, 0x03, 0x2e, 0x65, 0x75, 0x30, 0x06, 0x82, 0x04, 0x2e,
    0x65, 0x64, 0x75, 0x30, 0x06, 0x82, 0x04, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x05, 0x81, 0x03, 0x2e,
    0x67, 0x72, 0x30, 0x05, 0x81, 0x03, 0x2e, 0x65, 0x75, 0x30, 0x06, 0x81, 0x04, 0x2e, 0x65, 0x64,
    0x75, 0x30, 0x06, 0x81, 0x04, 0x2e, 0x6f, 0x72, 0x67
};

static const uint8_t g_extDataNoKeyUsage[] = { /* ext data not has keyusage */
    0x30, 0x81, 0x79, 0x30, 0x0f, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x05, 0x30,
    0x03, 0x01, 0x01, 0xff, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xa6,
    0x91, 0x42, 0xfd, 0x13, 0x61, 0x4a, 0x23, 0x9e, 0x08, 0xa4, 0x29, 0xe5, 0xd8, 0x13, 0x04, 0x23,
    0xee, 0x41, 0x25, 0x30, 0x47, 0x06, 0x03, 0x55, 0x1d, 0x1e, 0x04, 0x40, 0x30, 0x3e, 0xa0, 0x3c,
    0x30, 0x05, 0x82, 0x03, 0x2e, 0x67, 0x72, 0x30, 0x05, 0x82, 0x03, 0x2e, 0x65, 0x75, 0x30, 0x06,
    0x82, 0x04, 0x2e, 0x65, 0x64, 0x75, 0x30, 0x06, 0x82, 0x04, 0x2e, 0x6f, 0x72, 0x67, 0x30, 0x05,
    0x81, 0x03, 0x2e, 0x67, 0x72, 0x30, 0x05, 0x81, 0x03, 0x2e, 0x65, 0x75, 0x30, 0x06, 0x81, 0x04,
    0x2e, 0x65, 0x64, 0x75, 0x30, 0x06, 0x81, 0x04, 0x2e, 0x6f, 0x72, 0x67,
};

static const uint8_t g_extensionData03[] = { /* Der format */
    0x30, 0x81, 0xc6, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0x8c, 0xa3,
    0x3b, 0x42, 0x63, 0x01, 0xb3, 0x4d, 0x51, 0xf6, 0xe4, 0x2d, 0xb5, 0x83, 0x7f, 0x18, 0x39, 0x2f,
    0xb7, 0xb5, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x8c,
    0xa3, 0x3b, 0x42, 0x63, 0x01, 0xb3, 0x4d, 0x51, 0xf6, 0xe4, 0x2d, 0xb5, 0x83, 0x7f, 0x18, 0x39,
    0x2f, 0xb7, 0xb5, 0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30,
    0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x02, 0x30, 0x0b, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x04, 0x04,
    0x03, 0x02, 0x01, 0x06, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x25, 0x04, 0x16, 0x30, 0x14, 0x06,
    0x08, 0x2b, 0x06, 0x01, 0x05, 0x05, 0x07, 0x03, 0x01, 0x06, 0x08, 0x2b, 0x06, 0x01, 0x05, 0x05,
    0x07, 0x03, 0x02, 0x30, 0x21, 0x06, 0x03, 0x55, 0x1d, 0x11, 0x04, 0x1a, 0x30, 0x18, 0x81, 0x16,
    0x63, 0x61, 0x40, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f,
    0x72, 0x6b, 0x2e, 0x63, 0x6f, 0x6d, 0x30, 0x21, 0x06, 0x03, 0x55, 0x1d, 0x12, 0x04, 0x1a, 0x30,
    0x18, 0x81, 0x16, 0x63, 0x61, 0x40, 0x63, 0x72, 0x79, 0x70, 0x74, 0x6f, 0x66, 0x72, 0x61, 0x6d,
    0x65, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x63, 0x6f, 0x6d
};

/* g_extensionData03
    X509v3 extensions:
        X509v3 Subject Key Identifier: (oid: 2.5.29.14)
            8C:A3:3B:42:63:01:B3:4D:51:F6:E4:2D:B5:83:7F:18:39:2F:B7:B5
        X509v3 Authority Key Identifier: (oid: 2.5.29.35)
            keyid:8C:A3:3B:42:63:01:B3:4D:51:F6:E4:2D:B5:83:7F:18:39:2F:B7:B5

        X509v3 Basic Constraints: critical (oid: 2.5.29.19)
            CA:TRUE, pathlen:2
        X509v3 Key Usage: (oid: 2.5.29.15)
            Certificate Sign, CRL Sign
        X509v3 Extended Key Usage: (oid: 2.5.29.37)
            TLS Web Server Authentication, TLS Web Client Authentication
        X509v3 Subject Alternative Name: (oid: 2.5.29.17)
            email:ca@cryptoframework.com
        X509v3 Issuer Alternative Name: (oid: 2.5.29.18)
            email:ca@cryptoframework.com
*/

static char oid01[] = "2.5.29.14";
static char oid02[] = "2.5.29.35";
static char oid03[] = "2.5.29.19";
static char oid04[] = "2.5.29.15";
static char oid05[] = "2.5.29.37";
static char oid06[] = "2.5.29.17";
static char oid07[] = "2.5.29.18";

static const CfBlob g_allOidArray[] = {
    { strlen(oid01), reinterpret_cast<uint8_t *>(oid01) },
    { strlen(oid02), reinterpret_cast<uint8_t *>(oid02) },
    { strlen(oid03), reinterpret_cast<uint8_t *>(oid03) },
    { strlen(oid04), reinterpret_cast<uint8_t *>(oid04) },
    { strlen(oid05), reinterpret_cast<uint8_t *>(oid05) },
    { strlen(oid06), reinterpret_cast<uint8_t *>(oid06) },
    { strlen(oid07), reinterpret_cast<uint8_t *>(oid07) },
};

static const CfBlob g_critOidArray[] = {
    { strlen(oid03), reinterpret_cast<uint8_t *>(oid03) },
};

static const CfBlob g_uncritOidArray[] = {
    { strlen(oid01), reinterpret_cast<uint8_t *>(oid01) },
    { strlen(oid02), reinterpret_cast<uint8_t *>(oid02) },
    { strlen(oid04), reinterpret_cast<uint8_t *>(oid04) },
    { strlen(oid05), reinterpret_cast<uint8_t *>(oid05) },
    { strlen(oid06), reinterpret_cast<uint8_t *>(oid06) },
    { strlen(oid07), reinterpret_cast<uint8_t *>(oid07) },
};

static const CfBlobArray g_expectAllOidArray = {
    .data = const_cast<CfBlob *>(g_allOidArray),
    .count = sizeof(g_allOidArray) / sizeof(CfBlob)
};

static const CfBlobArray g_expectCritOidArray = {
    .data = const_cast<CfBlob *>(g_critOidArray),
    .count =sizeof(g_critOidArray) / sizeof(CfBlob)
};

static const CfBlobArray g_expectUncritOidArray = {
    const_cast<CfBlob *>(g_uncritOidArray),
    sizeof(g_uncritOidArray) / sizeof(CfBlob)
};

static const CfBlob g_extensionEntryBlob01 = {
    sizeof(g_extensionEntry01), const_cast<uint8_t *>(g_extensionEntry01)
};

static const CfBlob g_extensionEntryCriticalBlob01 = {
    sizeof(g_extensionEntryCritical01), const_cast<uint8_t *>(g_extensionEntryCritical01)
};

static const CfBlob g_extensionEntryValueBlob01 = {
    sizeof(g_extensionEntryValue01), const_cast<uint8_t *>(g_extensionEntryValue01)
};

static const uint8_t g_extensionEntry03[] = { /* the data gain from g_extensionData03 */
    0x30, 0x12, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, 0x01, 0xff, 0x04, 0x08, 0x30, 0x06, 0x01, 0x01,
    0xff, 0x02, 0x01, 0x02,
};
static const uint8_t g_extensionEntryCritical03[] = { /* the data gain from g_extensionData03 */
    0x01
};
static const uint8_t g_extensionEntryValue03[] = { /* the data gain from g_extensionData03 */
    0x04, 0x08, 0x30, 0x06, 0x01, 0x01, 0xff, 0x02, 0x01, 0x02,
};

static const CfBlob g_extensionEntryBlob03 = {
    sizeof(g_extensionEntry03), const_cast<uint8_t *>(g_extensionEntry03)
};

static const CfBlob g_extensionEntryCriticalBlob03 = {
    sizeof(g_extensionEntryCritical03), const_cast<uint8_t *>(g_extensionEntryCritical03)
};

static const CfBlob g_extensionEntryValueBlob03 = {
    sizeof(g_extensionEntryValue03), const_cast<uint8_t *>(g_extensionEntryValue03)
};

static const uint8_t g_extensionTaintedData[] = { /* Tainted extension data: g_extensionData01 + invalid part */
    0x30, 0x40, 0x30, 0x0F, 0x06, 0x03, 0x55, 0x1D, 0x13, 0x01, 0x01, 0xFF, 0x04, 0x05, 0x30, 0x03,
    0x01, 0x01, 0xFF, 0x30, 0x0E, 0x06, 0x03, 0x55, 0x1D, 0x0F, 0x01, 0x01, 0xFF, 0x04, 0x04, 0x03,
    0x02, 0x01, 0xC6, 0x30, 0x1D, 0x06, 0x03, 0x55, 0x1D, 0x0E, 0x04, 0x16, 0x04, 0x14, 0xE0, 0x8C,
    0x9B, 0xDB, 0x25, 0x49, 0xB3, 0xF1, 0x7C, 0x86, 0xD6, 0xB2, 0x42, 0x87, 0x0B, 0xD0, 0x6B, 0xA0,
    0xD9, 0xE4, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66
};
}

#endif /* CF_TEST_DATA_H */

